<template>
	<view class="page">
		<u--textarea v-model="content" placeholder="请输入内容" ></u--textarea>
		<u-button type="success" text="提交" @click="submit" :customStyle="{marginTop:'30rpx'}"></u-button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				content:''
			};
		},
		methods: {
			submit(){
				let {content} = this;
				if(!content){
					return uni.$u.toast("内容不能为空!");
				}
				uni.showLoading({
					title: "提交反馈中..."
				})
				uni.$u.http.post('/User/feedback',{content}).then(async res =>{
					uni.hideLoading()
					this.content = "";
				}).catch(err => {
					uni.hideLoading()
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
.page{
	padding: 30rpx;
}
</style>
